package aop.framework.autoproxy.BeanNameAutoProxyCreator;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import example.samples.ArithmeticCalculator;


public class Main {
	public static void main(String[] args) {
		ApplicationContext springContext = new ClassPathXmlApplicationContext("aop/framework/autoproxy/BeanNameAutoProxyCreator/beannameautoproxycreator.xml");
		
		ArithmeticCalculator arithmeticCalculator = (ArithmeticCalculator) springContext.getBean("arithmeticCalculator");
		
		arithmeticCalculator.add(1, 2);
		
		arithmeticCalculator.sub(3, 4);
		
		arithmeticCalculator.mul(5, 6);
		
		arithmeticCalculator.div(7, 8);
	}
}
